#include <cctype>
#include <iostream>
using namespace std;
#include <string>

int main() {
    string s;
    getline(cin, s);

    int count = 0;
    auto start = s.begin();


    auto it = s.begin();
    while (it != s.end())
    {
        if (isdigit(*it))
        {
            int count_tmp = 0;
            auto tmp = it;

            while (it != s.end() && isdigit(*it))
            {
                it++;
                count_tmp++;
            }

            if (count_tmp > count)
            {
                count = count_tmp;
                start = tmp;
            }
        }
        else
        {
            it++;
        }
    }

    for (int i = 0; i < count; i++)
    {
        cout << *(start + i);
    }

}